temp=0
sum=[]
num=int(raw_input("num=:\n"))
count=int(raw_input("count=:\n"))
for ct in range(count):
	temp+=num
	num=num*10
	sum.append(temp)
	print temp
#print ("sum=%d")%sum
sum=reduce(lambda x,y :x+y,sum)
print sum